using System.Windows;
using System.Windows.Controls;

namespace jSLApp.Client.Controls
{
    public class VRPlayerWrapper : ContentControl
    {
        public VRPlayer _vrPlayer;

        public VRPlayerWrapper()
        {
            HorizontalContentAlignment=HorizontalAlignment.Stretch;
            VerticalContentAlignment=VerticalAlignment.Stretch;
            var grid = new Grid();

            var stackPanel1 = new StackPanel(){Orientation = Orientation.Horizontal,Margin = new Thickness(500,0,0,0)};
            var stackPanel2 = new StackPanel(){Orientation = Orientation.Vertical};
            var player = new RadCustomPlayer() { Volume = 1 };

            stackPanel2.Children.Add(player);

            stackPanel1.Children.Add(stackPanel2);
            

            _vrPlayer = new VRPlayer(player,grid);
            
            grid.Children.Add(stackPanel1);
            grid.Children.Add(_vrPlayer);

            this.Content = grid;
        }

        public object Header
        {
            get { return _vrPlayer.HeaderPresenter.Content; }
            set { _vrPlayer.HeaderPresenter.Content = value; }

        }
    }
}